package day03_Socket;

import javax.swing.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.Socket;

public class Clint_Thread extends Thread {
    private Socket socket;
    private BufferedReader br =null;
    public Clint_Thread(Socket socket){
        this.socket = socket;
    }

    @Override
    public void run() {
        try {
            String str = null;
            br = new BufferedReader(new InputStreamReader(socket.getInputStream()));
            while(!(str = br.readLine()).equals("exit")){
                System.out.println("asdasdasd");
                System.out.println(str);
            }



        } catch (IOException e) {
            e.printStackTrace();
        }

    }
}
